home *** CD-ROM | disk | FTP | other *** search
- on new_level
- global level, speed_of_astroids, max_littleships, max_littlebullets, max_astroids, little_ships_bullets, bullets_speed, astroidlist, lil_list, lil_bulletlist, bulletlist, max_bullets
- set level to level + 1
- put level into field "level"
- if level = 9 then
- final_level()
- exit
- end if
- set speed_of_astroids to 6 + (level * 2)
- if level < 3 then
- set max_littleships to 0
- end if
- if level > 3 then
- set max_littleships to level - 3
- end if
- set max_littlebullets to level
- set max_astroids to 3 + level
- if level > 2 then
- set max_astroids to 5
- end if
- set little_ships_bullets to 4
- set bullets_speed to 20
- set lil_bulletlist to []
- set mright to 0
- set bulletlist to []
- set astroidlist to []
- set lil_list to []
- repeat with t = 1 to max_littleships
- add(lil_list, birth(script "lil_ship script", count(lil_list) + 23))
- end repeat
- repeat with t = 1 to max_littlebullets
- setAt(lil_bulletlist, t, 0)
- end repeat
- repeat with t = 1 to max_astroids
- set n to random(2)
- if n = 1 then
- set h to random(200) - 400
- end if
- if n = 2 then
- set h to random(200) + 800
- end if
- set V to random(800) - 400
- set num to random(5) + 67
- add(astroidlist, birth(script "astroid script", count(astroidlist) + 12, h, V, num))
- end repeat
- set bulletlist to []
- repeat with t = 1 to max_bullets
- setAt(bulletlist, t, 0)
- end repeat
- repeat with t = 1 to max_bullets
- set the visible of sprite (t + 4) to 0
- setAt(bulletlist, t, 0)
- end repeat
- end
-